const getMD = function(millseconds) {
	let date = new Date(millseconds)

	let month = date.getMonth() + 1;
	let day = date.getDate();
	month = month > 9 ? month : '0' + month;
	day = day > 9 ? day : '0' + day;
	return `${month}-${day}`;
}

const getYMD = function(millseconds) {
	let date = new Date(millseconds)

	let year = date.getFullYear();
	let month = date.getMonth() + 1;
	let day = date.getDate();
	month = month > 9 ? month : '0' + month;
	day = day > 9 ? day : '0' + day;
	return `${year}-${month}-${day}`;
}

const getHM = function(millseconds) {
	let date = new Date(millseconds)

	let hour = date.getHours();
	let mimute = date.getMinutes();
	hour = hour > 9 ? hour : '0' + hour;
	mimute = mimute > 9 ? mimute : '0' + mimute;
	return `${hour}:${mimute}`;
}

export default {
	getYMD,
	getMD,
	getHM
}